#include <stdio.h>
#include <limits.h>
int main ()
{
	int i; 
	unsigned int j;

	
	printf("\n*****************************************\n");
	printf("********** INTEGER OVERFLOWS   **********\n");
	printf("*****************************************\n");
	
	//Signed MAX
	printf("\n******  Signed Example: INT_MAX + 1 *******\n");
	i = INT_MAX; // 2,147,483,647
	printf("i = %d\n",i);
		//printf("Adding: i++\n");
	i++;
	printf("i = %d\t\n", i); // i= -2,147,483,648
		
	//Signed MIN
	printf("\n****** Signed Example: INT_MIN - 1   *****\n");
	i = INT_MIN; // 2,147,483,647
	printf("i = %d\n",i);
		//printf("Adding: i++\n");
	i--;
	printf("i = %d\t\n\n", i); // i= -2,147,483,648
	
	
	
	//UnSigned MAX
	printf("\n******  UnSigned Example: UINT_MAX + 1 *******\n");
	j = UINT_MAX; 
	printf("j = %u\n",j);
		//printf("Adding: i++\n");
	j++;
	printf("j = %u\t\n", j); 
		
	//UnSigned MIN
	printf("\n******  UnSigned Example: UINT_MIN - 1   *****\n");
	j = 0; 	//UINT_MIN =0; 
	printf("j = %u\n",j);
		//printf("Adding: i++\n");
	j--;
	printf("j = %u\t\n\n", j); 
	
	return 0; 
	
}